package com.zoe.onelink.core.web.validation.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * <p>标题: </p>
 * <p>描述: </p>
 * <p>版权: Copyright (c) 2021</p>
 * <p>公司: 智业软件股份有限公司</p>
 *
 * @version: 1.0
 * @author: ruansheng
 * @date: 2021-10-15
 */
@Target(ElementType.PARAMETER)
@Retention(RUNTIME)
@Documented
public @interface Required {

    /**
     * 需要校验的字段
     */
    String[] value();

    /**
     * 校验策略
     */
    Strategy strategy() default Strategy.NOT_NULL;

    enum Strategy {
        NOT_NULL, NOT_EMPTY, NOT_BLANK
    }

}
